<template>
	<view class="page">
		<view class="topVue">
			<view class="safeVue" :style="{ height: statusBarHeight + 'rpx' }"></view>
			<view class="flex align-center padding-row30" :style="{ height: barHeight + 'rpx', top: statusBarHeight + 'rpx' }" @click="$tools.back()">
				<image src="../../static/back.png" style="width: 48rpx; height: 48rpx;"></image>
				<text style="line-height: 1; color: #454545; font-weight: 600; font-size: 32rpx; padding-left: 20rpx;">支付金额</text>
			</view>
		</view>
		
		<view class="banner">
			<image :src="img" style="width: 100%; height: 100%;"></image>
		</view>
		
		<view class="flex align-center padding-row30 margin50">
			<text style="color: #454545; padding-right: 30rpx;">支付金额</text>
			<input type="number" v-model="number" placeholder="请输入金额"/>
		</view>
		
		<view class="btn margin60">确定</view>
	</view>
</template>

<script>
	export default {
		data(){
			return {
				statusBarHeight: 0,
				barHeight: 0,
				number: "",
				img: ""
			}
		},
		async onLoad(option) {
			this.img = option.value
			let that = this;
			wx.getSystemInfo({
				success(res) {
					let deviceWidth = wx.getSystemInfoSync().windowWidth
					that.statusBarHeight = Number(res.statusBarHeight) * ( 750 / deviceWidth ) 
					let menuButtonInfo = wx.getMenuButtonBoundingClientRect()
					let barHeight = menuButtonInfo.height + (menuButtonInfo.top - res.statusBarHeight) * 2
					that.barHeight = Number(barHeight) * ( 750 / deviceWidth )
				},
			});
		},
		methods: {
			
		}
	}
</script>

<style lang="less" scoped>
	.banner {
		width: 100%;
		height: 450rpx;
		background: #f5f5f5;
	}
	input {
		flex: 1;
		height: 80rpx;
		border-radius: 15rpx;
		border: 2rpx solid #999;
		padding-left: 20rpx;
		color: #333;
	}
	
	.btn {
		width: 690rpx;
		height: 80rpx;
		background: #D37430;
		border-radius: 10rpx;
		text-align: center;
		line-height: 80rpx;
		color: #fff;
	}
</style>